/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="points_to_money")
public class PointsToMoney implements Serializable {
	public PointsToMoney() {
	}
	
	private int id;
	
	private java.util.Date startTime;
	
	private java.util.Date endTime;
	
	private Integer level;
	
	private Integer percent;
	
	private Integer points;
	
	private String name;
	
	public void setId(int value) {
		this.id = value;
	}
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_POINTSTOMONEY_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_POINTSTOMONEY_ID_GENERATOR", strategy="identity")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	/**
	 *  该兑换规则开始时间
	 */
	public void setStartTime(java.util.Date value) {
		this.startTime = value;
	}
	
	/**
	 *  该兑换规则开始时间
	 */
	@Column(name="startTime", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getStartTime() {
		return startTime;
	}
	
	/**
	 *  该兑换规则结束时间
	 */
	public void setEndTime(java.util.Date value) {
		this.endTime = value;
	}
	
	/**
	 *  该兑换规则结束时间
	 */
	@Column(name="endTime", nullable=true)	
	@Temporal(TemporalType.TIMESTAMP)	
	public java.util.Date getEndTime() {
		return endTime;
	}
	
	/**
	 * 可兑换等级
	 */
	public void setLevel(int value) {
		setLevel(new Integer(value));
	}
	
	/**
	 * 可兑换等级
	 */
	public void setLevel(Integer value) {
		this.level = value;
	}
	
	/**
	 * 可兑换等级
	 */
	@Column(name="level", nullable=true, length=10)	
	public Integer getLevel() {
		return level;
	}
	
	/**
	 * 100积分可以兑换多少现金
	 */
	public void setPercent(int value) {
		setPercent(new Integer(value));
	}
	
	/**
	 * 100积分可以兑换多少现金
	 */
	public void setPercent(Integer value) {
		this.percent = value;
	}
	
	/**
	 * 100积分可以兑换多少现金
	 */
	@Column(name="`percent`", nullable=true, length=10)	
	public Integer getPercent() {
		return percent;
	}
	
	public void setPoints(int value) {
		setPoints(new Integer(value));
	}
	
	public void setPoints(Integer value) {
		this.points = value;
	}
	
	@Column(name="points", nullable=true, length=10)	
	public Integer getPoints() {
		return points;
	}
	
	public void setName(String value) {
		this.name = value;
	}
	
	@Column(name="name", nullable=true, length=255)	
	public String getName() {
		return name;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("PointsToMoney[ ");
			sb.append("Id=").append(getId()).append(" ");
			sb.append("StartTime=").append(getStartTime()).append(" ");
			sb.append("EndTime=").append(getEndTime()).append(" ");
			sb.append("Level=").append(getLevel()).append(" ");
			sb.append("Percent=").append(getPercent()).append(" ");
			sb.append("Points=").append(getPoints()).append(" ");
			sb.append("Name=").append(getName()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
